<extend file='resource/admin/base'/>
<block name="content">
    <ul class="nav nav-tabs" role="tablist">
        <li ><a href="{{u('index')}}">栏目首页</a></li>
        <li class="active"><a href="{{u('post')}}" >栏目添加</a></li>
    </ul>
    <form action="" method="POST" class="form-horizontal">
        <div class="form-group">
            <input style="width: 50%" class="form-control" type="text" placeholder="栏目管理" readonly >
            <br>
            <label for="inputEmail3" class="col-sm-2 control-label">栏目名称</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" id="inputEmail3" name="cate_name" value="{{$oldData['cate_name']}}" placeholder="栏目名称">
            </div>
        </div>
        <div class="form-group">
            <label for="inputPassword3" class="col-sm-2 control-label">栏目排序</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" id="inputPassword3" name="cate_sort" value="{{$oldData['cate_sort']}}" placeholder="栏目排序">
            </div>
        </div>
        <div class="form-group">
            <label for="inputPassword3" class="col-sm-2 control-label">栏目外部链接</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" id="inputPassword3" name="cate_linkurl" value="{{$oldData['cate_linkurl']}}" placeholder="栏目外部链接">
            </div>
        </div>
        <div class="form-group">
            <label for="" class="col-sm-2 control-label">所属栏目</label>
            <div class="col-sm-10">
                <select name="cate_pid" id="inputID" class="form-control">
                    <option value="0"> -- 顶级栏目 -- </option>
                    <foreach from="$cateData" value="$d">
                        <option <if value="$oldData['cate_pid']==$d['cate_id']">selected</if> value="{{$d['cate_id']}}"> -- {{$d['_cate_name']}} -- </option>
                    </foreach>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label for="" class="col-sm-2 control-label">栏目描述</label>
            <div class="col-sm-10">
                <textarea name="cate_description" class="form-control" cols="30" rows="10">{{$oldData['cate_description']}}</textarea>
            </div>
        </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <button type="submit" class="btn btn-info">添加</button>
            </div>
        </div>
    </form>
</block>